/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cl.orientesalud.gui.mantenedores;

import cl.orientesalud.business.TratamientoDelegate;
import cl.orientesalud.dominio.Descuento;
import cl.orientesalud.dominio.TipoTratamiento;
import cl.orientesalud.util.OrienteLog;
import cl.orientesalud.util.UtilForm;
import java.util.List;
import java.util.logging.Level;
import org.apache.log4j.Logger;

/**
 *
 * @author nicolas
 */
public class MantenedorTipoTratamiento extends javax.swing.JDialog {
    Logger logger=OrienteLog.obtenerLogger(MantenedorTipoTratamiento.class);
    TratamientoDelegate delegate;
    UtilForm utilForm;
    Descuento descuento;
    /**
     * Creates new form MantenedorTipoTratamiento
     */
    public MantenedorTipoTratamiento(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
        delegate=new TratamientoDelegate();
        utilForm=new UtilForm();
        this.setLocation(300, 100);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        cmbTipoTratamiento = new javax.swing.JComboBox();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        txtNombreTt = new javax.swing.JTextField();
        txtValorTt = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        btnGuardar = new javax.swing.JButton();
        btnLimpiar = new javax.swing.JButton();
        jLabel7 = new javax.swing.JLabel();
        txtProtesis = new javax.swing.JTextField();
        jLabel8 = new javax.swing.JLabel();
        lblMensajeTipoTrat = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        txtNombreDescuento = new javax.swing.JTextField();
        txtValorDescuento = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        cmbDescuentos = new javax.swing.JComboBox();
        btnGuardarDto = new javax.swing.JButton();
        btnLimpiarDto = new javax.swing.JButton();
        btnIngresarDto = new javax.swing.JButton();
        lblMensajeDescuento = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowActivated(java.awt.event.WindowEvent evt) {
                formWindowActivated(evt);
            }
            public void windowOpened(java.awt.event.WindowEvent evt) {
                formWindowOpened(evt);
            }
        });

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Datos del tipo de tratamiento"));

        cmbTipoTratamiento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmbTipoTratamientoActionPerformed(evt);
            }
        });

        jLabel1.setText("Tipo de tratamiento:");

        jLabel2.setText("Nombre:");

        jLabel3.setText("Valor:");

        btnGuardar.setText("Guardar");
        btnGuardar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnGuardarActionPerformed(evt);
            }
        });

        btnLimpiar.setText("Limpiar");
        btnLimpiar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnLimpiarActionPerformed(evt);
            }
        });

        jLabel7.setText("Protesis:");

        org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel1Layout.createSequentialGroup()
                        .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jLabel8, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 163, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(lblMensajeTipoTrat))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .add(btnLimpiar)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                        .add(btnGuardar))
                    .add(jPanel1Layout.createSequentialGroup()
                        .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jLabel2)
                            .add(jLabel3)
                            .add(jLabel1)
                            .add(jLabel7))
                        .add(36, 36, 36)
                        .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(cmbTipoTratamiento, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(txtNombreTt, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 82, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(txtValorTt, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 82, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(txtProtesis, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 70, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                        .add(0, 226, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel1Layout.createSequentialGroup()
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jLabel1)
                    .add(cmbTipoTratamiento, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                    .add(jPanel1Layout.createSequentialGroup()
                        .add(jLabel2)
                        .add(18, 18, 18)
                        .add(jLabel3)
                        .add(27, 27, 27))
                    .add(jPanel1Layout.createSequentialGroup()
                        .add(txtNombreTt, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .add(txtValorTt, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)))
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(txtProtesis, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel7))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 25, Short.MAX_VALUE)
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                        .add(btnGuardar)
                        .add(btnLimpiar))
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel1Layout.createSequentialGroup()
                        .add(lblMensajeTipoTrat)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jLabel8)
                        .addContainerGap())))
        );

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Descuentos"));

        jLabel4.setText("Descuentos:");

        jLabel5.setText("Nombre:");

        jLabel6.setText("Valor:");

        cmbDescuentos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmbDescuentosActionPerformed(evt);
            }
        });

        btnGuardarDto.setText("Guardar");
        btnGuardarDto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnGuardarDtoActionPerformed(evt);
            }
        });

        btnLimpiarDto.setText("Limpiar");
        btnLimpiarDto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnLimpiarDtoActionPerformed(evt);
            }
        });

        btnIngresarDto.setText("Ingresar");
        btnIngresarDto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnIngresarDtoActionPerformed(evt);
            }
        });

        org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel2Layout.createSequentialGroup()
                .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel2Layout.createSequentialGroup()
                        .add(jLabel4)
                        .add(18, 18, 18)
                        .add(cmbDescuentos, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(jPanel2Layout.createSequentialGroup()
                        .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jLabel5)
                            .add(jLabel6))
                        .add(45, 45, 45)
                        .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
                            .add(org.jdesktop.layout.GroupLayout.LEADING, txtNombreDescuento)
                            .add(txtValorDescuento, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 176, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
                .add(0, 227, Short.MAX_VALUE))
            .add(jPanel2Layout.createSequentialGroup()
                .add(lblMensajeDescuento, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 125, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .add(btnLimpiarDto)
                .add(18, 18, 18)
                .add(btnIngresarDto)
                .add(18, 18, 18)
                .add(btnGuardarDto)
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel4)
                    .add(cmbDescuentos, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .add(18, 18, 18)
                .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jLabel5)
                    .add(txtNombreDescuento, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .add(18, 18, 18)
                .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jLabel6)
                    .add(txtValorDescuento, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .add(23, 23, 23)
                .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(btnGuardarDto)
                    .add(btnLimpiarDto)
                    .add(btnIngresarDto)
                    .add(lblMensajeDescuento, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(jPanel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(18, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void formWindowActivated(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowActivated
        // TODO add your handling code here:
    }//GEN-LAST:event_formWindowActivated

    private void formWindowOpened(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowOpened
        List<TipoTratamiento> tipos;
        try {
            tipos = delegate.obtenerTipoTratamientos();
            utilForm.llenarCombo(cmbTipoTratamiento, tipos);
            TipoTratamiento tipoTratamiento=(TipoTratamiento) cmbTipoTratamiento.getSelectedItem();
            List<Descuento> descuentos=delegate.obtenerDescuentos(tipoTratamiento);
           //utilForm.llenarCombo(cmbDescuentos, descuentos);
        } catch (Exception ex) {
             logger.error("Error:"+ex.getMessage());
        }
        
    }//GEN-LAST:event_formWindowOpened

    private void cmbTipoTratamientoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmbTipoTratamientoActionPerformed
        try {
            logger.error("");
            TipoTratamiento tipoTratamiento=(TipoTratamiento) cmbTipoTratamiento.getSelectedItem();
            List<Descuento> descuentos=delegate.obtenerDescuentos(tipoTratamiento);             
            cmbDescuentos.removeAllItems();            
            utilForm.llenarCombo(cmbDescuentos, descuentos);
            txtNombreTt.setText(tipoTratamiento.getDescripcion());
            txtValorTt.setText(String.valueOf(tipoTratamiento.getValor()));
            txtProtesis.setText(String.valueOf(tipoTratamiento.getProtesis()));
        } catch (Exception ex) {            
            logger.error("Error:"+ex.getMessage());
            lblMensajeTipoTrat.setText(ex.getMessage());
        }
    }//GEN-LAST:event_cmbTipoTratamientoActionPerformed

    private void btnGuardarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGuardarActionPerformed
        try {
            lblMensajeTipoTrat.setText("");
            TipoTratamiento tipoTratamiento=(TipoTratamiento) cmbTipoTratamiento.getSelectedItem();
            tipoTratamiento.setDescripcion(txtNombreTt.getText());
            tipoTratamiento.setProtesis(Long.valueOf(txtProtesis.getText()));
            tipoTratamiento.setValor(Long.valueOf(txtValorTt.getText()));
            delegate.modificarTipoTratamiento(tipoTratamiento);
            cmbTipoTratamiento.removeAllItems();
            List<TipoTratamiento> tipos = delegate.obtenerTipoTratamientos();
            utilForm.llenarCombo(cmbTipoTratamiento, tipos);
            lblMensajeTipoTrat.setText("Tipo tratamiento modificado correctamente");
        } catch (Exception ex) {
            logger.error("Error:"+ex.getMessage());
            lblMensajeTipoTrat.setText(ex.getMessage());
        }
    }//GEN-LAST:event_btnGuardarActionPerformed

    private void btnLimpiarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLimpiarActionPerformed
       utilForm.limpiarFormulario(jPanel1);
       lblMensajeTipoTrat.setText("");
    }//GEN-LAST:event_btnLimpiarActionPerformed

    private void cmbDescuentosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmbDescuentosActionPerformed
        if(cmbDescuentos.getItemCount()>0){
            Descuento desc=(Descuento) cmbDescuentos.getSelectedItem();
            txtNombreDescuento.setText(desc.getDescripcion());
            txtValorDescuento.setText(String.valueOf(desc.getValor()));
        }
    }//GEN-LAST:event_cmbDescuentosActionPerformed

    private void btnGuardarDtoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGuardarDtoActionPerformed
        lblMensajeDescuento.setText("");  
        Descuento desc=(Descuento) cmbDescuentos.getSelectedItem();
         desc.setDescripcion(txtNombreDescuento.getText());
         desc.setValor(Long.valueOf(txtValorDescuento.getText()));
         lblMensajeDescuento.setText("Descuento modificado"); 
        try {
            delegate.modificarDescuento(desc);
        } catch (Exception ex) {
             logger.error("Error:"+ex.getMessage());
             lblMensajeDescuento.setText(ex.getMessage()); 
        }
    }//GEN-LAST:event_btnGuardarDtoActionPerformed

    private void btnLimpiarDtoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLimpiarDtoActionPerformed
        utilForm.limpiarFormulario(jPanel2);
        lblMensajeDescuento.setText("");
        
    }//GEN-LAST:event_btnLimpiarDtoActionPerformed

    private void btnIngresarDtoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnIngresarDtoActionPerformed
        lblMensajeDescuento.setText(""); 
        TipoTratamiento tipoTratamiento=(TipoTratamiento) cmbTipoTratamiento.getSelectedItem();
         Descuento desc=(Descuento) cmbDescuentos.getSelectedItem();
         desc.setDescripcion(txtNombreDescuento.getText());
         desc.setValor(Long.valueOf(txtValorDescuento.getText()));
         desc.setTipoTratamiento(tipoTratamiento);
         lblMensajeDescuento.setText("Descuento Ingresado"); 
        try {
            delegate.insertarDescuento(desc);
        } catch (Exception ex) {
            logger.error("Error:"+ex.getMessage());
            lblMensajeDescuento.setText(ex.getMessage()); 
        }
    }//GEN-LAST:event_btnIngresarDtoActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(MantenedorTipoTratamiento.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(MantenedorTipoTratamiento.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(MantenedorTipoTratamiento.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(MantenedorTipoTratamiento.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the dialog */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                MantenedorTipoTratamiento dialog = new MantenedorTipoTratamiento(new javax.swing.JFrame(), true);
                dialog.addWindowListener(new java.awt.event.WindowAdapter() {
                    @Override
                    public void windowClosing(java.awt.event.WindowEvent e) {
                        System.exit(0);
                    }
                });
                dialog.setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnGuardar;
    private javax.swing.JButton btnGuardarDto;
    private javax.swing.JButton btnIngresarDto;
    private javax.swing.JButton btnLimpiar;
    private javax.swing.JButton btnLimpiarDto;
    private javax.swing.JComboBox cmbDescuentos;
    private javax.swing.JComboBox cmbTipoTratamiento;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JLabel lblMensajeDescuento;
    private javax.swing.JLabel lblMensajeTipoTrat;
    private javax.swing.JTextField txtNombreDescuento;
    private javax.swing.JTextField txtNombreTt;
    private javax.swing.JTextField txtProtesis;
    private javax.swing.JTextField txtValorDescuento;
    private javax.swing.JTextField txtValorTt;
    // End of variables declaration//GEN-END:variables
}
